<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta name="GENERATOR" content="PasDoc 0.9.0">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>smtpsend</title>
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
<h1 class="unit">Unit smtpsend</h1>
<table class="sections">
<tr>
<td><a class="section"  href="#@Description">Description</a></td><td><a class="section"  href="#@Uses">uses</a></td><td><a class="section"  href="#@Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section"  href="#@FuncsProcs">Functions and Procedures</a></td><td>Types</td><td><a class="section"  href="#@Constants">Constants</a></td><td>Variables</td></tr></table>
<a name="@Description"></a><h2 class="description">Description</h2>
<p>
SMTP client</p>
<p>


<p>Used RFC: RFC-1869, RFC-1870, RFC-1893, RFC-2034, RFC-2104, RFC-2195, RFC-2487, RFC-2554, RFC-2821</p>
<a name="@Uses"></a><h2 class="uses">uses</h2>
<ul class="useslist"><li>SysUtils</li><li>Classes</li><li><a   href="blcksock.html">blcksock</a></li><li><a   href="synautil.html">synautil</a></li><li><a   href="synacode.html">synacode</a></li></ul><h2 class="overview">Overview</h2>
<a name="@Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">Class&nbsp;<a class="bold"  href="smtpsend.TSMTPSend.html"><code>TSMTPSend</code></a></td>
<td class="itemdesc">Implementation of SMTP and ESMTP procotol</td>
</tr>
</table>
<a name="@FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
<table class="summary">
<tr class="list">
<td class="itemcode"><code>function <b><a   href="smtpsend.html#SendToRaw">SendToRaw</a></b>(const MailFrom, MailTo, SMTPHost: string; const MailData: TStrings; const Username, Password: string): Boolean;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="smtpsend.html#SendTo">SendTo</a></b>(const MailFrom, MailTo, Subject, SMTPHost: string; const MailData: TStrings): Boolean;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="smtpsend.html#SendToEx">SendToEx</a></b>(const MailFrom, MailTo, Subject, SMTPHost: string; const MailData: TStrings; const Username, Password: string): Boolean;</code></td>
</tr>
</table>
<a name="@Constants"></a><h3 class="summary">Constants</h3>
<table class="summary">
<tr class="list">
<td class="itemcode"><code><b><a   href="smtpsend.html#cSmtpProtocol">cSmtpProtocol</a></b> = '25';</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail">
<tr class="list">
<td class="itemcode"><a name="SendToRaw"></a><code>function <b>SendToRaw</b>(const MailFrom, MailTo, SMTPHost: string; const MailData: TStrings; const Username, Password: string): Boolean;</code></td>
</tr>
</table>
<p>
A very useful function and example of its use would be found in the TSMTPsend object. Send maildata (text of e-mail with all SMTP headers! For example when text of message is created by <a class="normal" href="mimemess.TMimeMess.html">TMimeMess</a> object) from &quot;MailFrom&quot; e-mail address to &quot;MailTo&quot; e-mail address (If you need more then one receiver, then separate their addresses by comma).

<p>Function sends e-mail to a SMTP server defined in &quot;SMTPhost&quot; parameter. Username and password are used for authorization to the &quot;SMTPhost&quot;. If you don't want authorization, set &quot;Username&quot; and &quot;Password&quot; to empty strings. If e-mail message is successfully sent, the result returns <code>True</code>.

<p>If you need use different port number then standard, then add this port number to SMTPhost after colon. (i.e. '127.0.0.1:1025')</p>
<table class="detail">
<tr class="list">
<td class="itemcode"><a name="SendTo"></a><code>function <b>SendTo</b>(const MailFrom, MailTo, Subject, SMTPHost: string; const MailData: TStrings): Boolean;</code></td>
</tr>
</table>
<p>
A very useful function and example of its use would be found in the TSMTPsend object. Send &quot;Maildata&quot; (text of e-mail without any SMTP headers!) from &quot;MailFrom&quot; e-mail address to &quot;MailTo&quot; e-mail address with &quot;Subject&quot;. (If you need more then one receiver, then separate their addresses by comma).

<p>This function constructs all needed SMTP headers (with DATE header) and sends the e-mail to the SMTP server defined in the &quot;SMTPhost&quot; parameter. If the e-mail message is successfully sent, the result will be <code>True</code>.

<p>If you need use different port number then standard, then add this port number to SMTPhost after colon. (i.e. '127.0.0.1:1025')</p>
<table class="detail">
<tr class="list">
<td class="itemcode"><a name="SendToEx"></a><code>function <b>SendToEx</b>(const MailFrom, MailTo, Subject, SMTPHost: string; const MailData: TStrings; const Username, Password: string): Boolean;</code></td>
</tr>
</table>
<p>
A very useful function and example of its use would be found in the TSMTPsend object. Sends &quot;MailData&quot; (text of e-mail without any SMTP headers!) from &quot;MailFrom&quot; e-mail address to &quot;MailTo&quot; e-mail address (If you need more then one receiver, then separate their addresses by comma).

<p>This function sends the e-mail to the SMTP server defined in the &quot;SMTPhost&quot; parameter. Username and password are used for authorization to the &quot;SMTPhost&quot;. If you dont want authorization, set &quot;Username&quot; and &quot;Password&quot; to empty Strings. If the e-mail message is successfully sent, the result will be <code>True</code>.

<p>If you need use different port number then standard, then add this port number to SMTPhost after colon. (i.e. '127.0.0.1:1025')</p>
<h3 class="detail">Constants</h3>
<table class="detail">
<tr class="list">
<td class="itemcode"><a name="cSmtpProtocol"></a><code><b>cSmtpProtocol</b> = '25';</code></td>
</tr>
</table>
&nbsp;<hr noshade size="1"><span class="appinfo"><em>Generated by <a  target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.9.0</a> on 2009-10-08 16:24:26</em>
</span>
</body></html>
